package cn.layfolk.seckill.mapper;

import cn.layfolk.seckill.domain.TOrderInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author ${author}
 * @since 2021-01-10
 */
public interface TOrderInfoMapper extends BaseMapper<TOrderInfo> {

    @Update("update t_order_info set status = #{status} where order_no = #{orderNo}")
    void updateStatus(String orderNo, Integer status);

    @Update("update t_order_info set status = 1 where order_no = #{orderNo} and status = 0")
    int paySuccess(String orderNo);
}
